<!DOCTYPE html>
<%@include file="../include/init.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml" scroll="no">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="${res}favicon.ico" type="image/x-icon" />
<link href="${ctx}framework/css/font.css" rel="stylesheet" />
<link href="${ctx}framework/miniui/themes/material/miniui.css" rel="stylesheet" />
<link href="${ctx}framework/css/app.min.1.css" rel="stylesheet" type="text/css" />
<link href="${ctx}framework/css/app.min.2.css" rel="stylesheet" type="text/css" />
<script src="${ctx}framework/main.js" type="text/javascript"></script>
<style type="text/css">
	.input-group-addon{width:80px;text-align: right;}
	html, body{ margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;} 
</style>
<script>
function uploadSave(func){
	var u = new mini.Uploder("Image");
	if(u.validate() == false){
		return;
	}
	checkFileName(u);
	u.sendRequest("fileUpload.saveUrlAsAdmin", { Id : '${Id}',Key:"ImgUrl" },function(response){
		if(response.Status==0){
			top.mini.warn(response.Message);
			return;
		}
		var attachs = response.Attachs;
		/* var fileName = response.FileName;
 		var absolutePath = response.AbsolutePath; 
		var previewPath = response.PreviewPath; */
		if(func){
			func(attachs);
		}
	}); 
}
$(function(){
	var u = new mini.Uploder("Image");
});
function checkFileName(u){
	console.info(u);
}
</script>
</head>
<body>
<form id="form2">
<div class="container-fluid">
	<div class="row">
		<div class="col-xs-12">
			<div class="card" style="box-shadow:none;padding-top:20px;padding-left:100px;">
				 <div class="input-group">
					<span class="input-group-addon"><label for="$text">请选择本地的图片，大小不超过3M</label></span>
				</div>
				<div class="input-group">
					<input type="file" id="Image" class="mini-uploader" fileCount="1" allowedType="gif,png,jpg,jpeg,bmp" fileSizeLimit="3MB" required="true"/>
				</div>
			</div>
		</div>
	</div>
</div>
</form>
</body>
</html>
